package com.wpzf.zxhc.controller;

import com.wpzf.common.core.web.domain.AjaxResult;
import com.wpzf.zxhc.domain.YtbTbInfo;
import com.wpzf.zxhc.service.XzqhService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/xzqh")
public class XzqhController {
    @Autowired
    XzqhService xzqhService;

    @RequestMapping(value = "/getSheng", method = RequestMethod.GET)
    public AjaxResult getSheng() {
        try {
            return AjaxResult.success("获取成功", xzqhService.getSheng());
        } catch (Exception ex) {
            return AjaxResult.error("获取失败", ex.toString());
        }
    }

    @RequestMapping(value = "/getShi", method = RequestMethod.POST)
    public AjaxResult getShi(@RequestBody Map<String, Object> parm) {
        try {
            return AjaxResult.success("获取成功", xzqhService.getShi(parm));
        } catch (Exception ex) {
            return AjaxResult.error("获取失败", ex.toString());
        }
    }

    @RequestMapping(value = "/getXian", method = RequestMethod.POST)
    public AjaxResult getXian(@RequestBody Map<String, Object> parm) {
        try {
            return AjaxResult.success("获取成功", xzqhService.getXian(parm));
        } catch (Exception ex) {
            return AjaxResult.error("获取失败", ex.toString());
        }
    }
}
